packet is the abstract base class of the class hierarchy representing the different data packets. The base class as well as the derived classes contain a method, unify, which performs transformation into the unified data representation.

Note:

Although the terms 'method', 'service', and 'operation' are often used as synonyms, sometimes they will be distinguished in context of polymophism. While an 'operation' belongs to the interface declaration of a 'service', the 'method' belongs to the implementation. With polymorphism one operation can be implemented with many methods. (Here operation unify has many methods.)


The communication controller itself can be modeled like this:

The Objective VHDL attribute 'CLASS makes the parameter i polymorphic (i can hold a packet or a special_packet).

If the unify operation is invoked with the polymorphic object i,

i.unify(loc_packet);

the run-time system chooses the method unify from the class that i is currently member of.